function output = fn_alphaF(delta,R1,D0,chi,s,phi,dist_d,d_min,d_max)

rho1_s = fn_rho1(s,phi);
chi_s  = fn_chi(s,chi);

f = @(x) max(x*R1-delta,0).*dist_d.pdf(x);

num   = (R1-chi_s.*rho1_s)*D0;
denom = integral(f,d_min,d_max);

Z     = 1 - num/denom;

output = max(Z,0);

end